#define CRT_SECURE_NO_WARNINGS
#include<stdio.h>
int lily_number_define(int number)
{
	int i = 10;
	int sum = 0;
	while (number / i)
	{
		sum += number % i;
	}
	if (number == sum)
	{
		return 1;
	}
	else
	{
		return 0;
	}
}


int main()
{
	for (int i = 1; i <= 1000; i++)
	{
		if (lily_number_define(i))
		{
			fprintf(stdout, "%d ", i);
		}
	}

	return 0;
}
